package dialer.ws.business.service.impl;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import dialer.ws.base.entity.FormField;
import dialer.ws.base.exception.EntityException;
import dialer.ws.base.query.NamedQueryParameter;
import dialer.ws.base.service.impl.GenericServiceImpl;
import dialer.ws.business.dao.FormFieldDAO;
import dialer.ws.business.service.FormFieldService;

@Service("formFieldService")
public class FormFieldServiceImpl extends GenericServiceImpl<FormField, Integer> implements FormFieldService,
		Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3682772078951059745L;

	private FormFieldDAO formFieldDAO;

	@Autowired
	public FormFieldServiceImpl(FormFieldDAO formFieldDAO) {
		super(formFieldDAO);
		this.formFieldDAO = formFieldDAO;
	}

	@Override
	public List<FormField> getFormFieldById(Integer id) {
		NamedQueryParameter param = new NamedQueryParameter("id_form", id);
		return findByNamedQueryNamedParameter("getFormFieldById", param);
	}

}
